package cdworks.lifecounter;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

public class ActivityAddTypeIn extends Activity {
	
	private LCDbManager manager;
	private EditText et; 

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_add_type_in);
		manager = new LCDbManager(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.edit_in, menu);
		return true;
	}
	
	public void addTypeIn(View view){
		//int id = view.getId();
		
		et = (EditText)findViewById(R.id.edit_type_in);
		String type = et.getText().toString();
		manager.putTypeIn(type);
		
		Intent intent = new Intent(ActivityAddTypeIn.this, ActivityIn.class);
		//intent.putExtra(AMOUNT_TYPE_IN, type);
        startActivity(intent);
	}

}

